package primitives;

import java.util.ArrayList;

import utility.Vector3;

public class Light extends Box {
	
	public Light() {
		this.reflectance = 0.0;
		this.emission = 1.0;
	}
	
	public void initLight() {
		for(Patch patch : patches) {
		//	int patchColor = (color == -1) ? new Random().nextInt() : color;
		//	patches.get(i).color = patchColor;
		//	patches.get(i+1).color = patchColor;
			patch.emission = emission;
			patch.reflectance = reflectance;
		}
	}
	
	public void initPatches() {
		patches = new ArrayList<Patch>(2);
		patches.add(new Patch(new Vector3[]{vec3[4], vec3[7], vec3[5]}, this));
		patches.add(new Patch(new Vector3[]{vec3[6], vec3[5], vec3[7]}, this));
	}
}
